package br.ufrn.findabomb.util;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Triple<T extends Number> {
	private T x;
	private T y;
	private T z;
	
	public Triple(T x,T y,T z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}
	public T getX() {
		return x;
	}
	public void setX(T x) {
		this.x = x;
	}
	public T getY() {
		return y;
	}
	public void setY(T y) {
		this.y = y;
	}
	public T getZ() {
		return z;
	}
	public void setZ(T z) {
		this.z = z;
	}
	
	public void parseString(String str, Class S) throws NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		String[] d = str.split(",");
		//T obj = new T();;
		Method m = S.getDeclaredMethod("parse"+S.getName(), String.class); // DEPOIS
		//T res = (T) m.invoke(obj, str);
	}
	public long distanceTo(Triple<Long> position) {
		// TODO Auto-generated method stub
		return 0;
	}
}
